package com.xxj.dao.impl;

import java.sql.SQLException;
import java.util.ArrayList;

import com.xxj.entity.ProductDetailsEntity;
import com.xxj.util.DBManager;
import com.xxj.util.QueryResult;

public class ProductDetailsDaoImpl {
	public ArrayList<ProductDetailsEntity> img() {
		ArrayList<ProductDetailsEntity> aList = new ArrayList<ProductDetailsEntity>();
		String sqlString = "select id,create_time,img,pId from pImg";
		QueryResult result = DBManager.executeQuery(sqlString);
		if (result != null) {
			try {
				while (result.rs.next()) {
					aList.add(new ProductDetailsEntity(result.rs.getInt("id"),
							result.rs.getDate("create_time"),
							result.rs.getString("img"),
							result.rs.getString("pId")));
					
				}
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		
		result.close();
		return null;
	}

}
